package com.household.domain.enums;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * Created By wanzhen
 * 2023. 2023/3/25. 11:32
 */
@AllArgsConstructor
@NoArgsConstructor
public enum PasswordEncoderEnum {
    BCRYPT("bcrypt", new BCryptPasswordEncoder());

    private String name;  //加密算法名称

    private PasswordEncoder passwordEncoder; //加密算法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public PasswordEncoder getPasswordEncoder() {
        return passwordEncoder;
    }

    public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
        this.passwordEncoder = passwordEncoder;
    }
}
